<?php
($goods_id = (int)_POST('goods_id')) || abort('无效参数!');

$page = (int)_POST('page')?:1;

$limit = (int)_POST('limit')?:10;

$start = ($page - 1)*($limit+1);

$data = $GLOBALS['db']->getAll('SELECT * FROM '.$GLOBALS['ecs']->table('comment')." WHERE status=1 AND comment_type=2 AND id_value={$goods_id}");

$data || $data = [];

return $data;